﻿using System;
using System.Xml;

namespace PolePosition.v3.WcfService.MapServices
{
    public partial class AssetMeterDistribution : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var _SqlCommand = new System.Data.SqlClient.SqlCommand();

            if (Request.QueryString["ID"] != null)
            {
                _SqlCommand.CommandText = "up_MapHtml_AssetDistributionMeter";
                _SqlCommand.Parameters.AddWithValue("@Id", Request.QueryString["ID"]);

                var _Xml = ProjectCommon2.Helpers.SqlHelper.ExecuteScalar<string>(_SqlCommand);
                var _XmlDocument = new XmlDocument();

                _XmlDocument.LoadXml(_Xml);

                FormViewAssetStructure.DataSource = _XmlDocument;
                FormViewAssetStructure.DataBind();
            }
        }
    }
}
